<script setup>
import { ref, reactive } from 'vue'
import childB from '@/components/childB.vue'
const props = defineProps({
  message:Number
})
const spendEmit = defineEmits(['spendTofater'])
const spend = () => {
  spendEmit('spendTofater',5)
}

const son =ref('123')
const talk = () =>{
  console.log('老爸你可以拿我的数据和方法了');
}
defineExpose({
  son,
  talk
})
</script>

<template>
  <button @click="spend">儿子花钱</button>
  <div>{{ message }}</div>
  <div></div>
  <childB/>
</template>

<style scoped lang='scss'>

</style>